import inquirer from "inquirer";

export default () =>
  inquirer.prompt([
    {
      type: "list",
      name: "framework",
      message: "请选择框架",
      choices: [
        { value: "vue", name: "vue（开发中...）", disabled: true },
        { value: "react", name: "react" },
        { value: "js", name: "none" },
      ],
      default: "react",
      validate(val) {
        if (val) return true;
        return "请选择框架";
      },
    },
    {
      type: "list",
      name: "installTool",
      message: "select installation Tool",
      default: "yarn",
      choices: [
        { value: "yarn", name: "yarn" },
        { value: "npm", name: "npm" },
      ],
    },
  ]);
